import request from '@/utils/request'

// 查询数字直播列表
export function listLivestreaming(query) {
  return request({
    url: '/finance/livestreaming/list',
    method: 'get',
    params: query
  })
}


// 购买数字直播
export function buyLivestreaming(data) {
  return request({
    url: '/finance/livestreaming/buyLivestreaming',
    method: 'post',
    data: data
  })
}

// 购买数字直播 - 抵扣支付
export function deductionBuyLivestreaming(data) {
  return request({
    url: '/finance/livestreaming/deductionBuyLivestreaming',
    method: 'post',
    data: data
  })
}

// 查询用户邀请人
export function userInviteTree(data) {
  return request({
    url: '/finance/livestreaming/userInviteTree',
    method: 'post',
    data: data
  })
}

// 数字直播对冲产品
export function mutualRecharge(data) {
  return request({
    url: '/finance/livestreaming/mutualRecharge',
    method: 'post',
    data: data
  })
}

// 数字直播对冲提现余额
export function mutualRechargeBalance(data) {
  return request({
    url: '/finance/livestreaming/mutualRechargeBalance',
    method: 'post',
    data: data
  })
}

// 导出数字直播
export function exportLivestreaming(query) {
  return request({
    url: '/finance/livestreaming/export',
    method: 'get',
    params: query
  })
}

// 代理等级下拉框
export function listSzVipRule() {
  return request({
    url: '/rules/common/listSzVipRule',
    method: 'post'
  })
}

// 代码项查询
export function dmcTable(data) {
  return request({
    url: '/rules/common/dmcTable',
    method: 'post',
    data: data
  })
}

// 查询购买时的基础信息
export function getOtherRule() {
  return request({
    url: '/rules/common/getOtherRule',
    method: 'post'
  })
}

// 查询购买者信息
export function listSzUserSimple(data) {
  return request({
    url: '/rules/common/listSzUserSimple',
    method: 'post',
    data: data
  })
}

// 数字直播 提现
export function balanceWithdrawal(data) {
  return request({
    url: '/finance/livestreamingUser/balanceWithdrawal',
    method: 'post',
    data: data
  })
}

// 数字直播 礼物打赏
export function rewardWithGifts(data) {
  return request({
    url: '/finance/livestreamingUser/rewardWithGifts',
    method: 'post',
    data: data
  })
}

// 数字直播 购买记录查询
export function purchaseRecordToAdmin(data) {
  return request({
    url: '/finance/livestreaming/purchaseRecordToAdmin',
    method: 'post',
    data: data
  })
}

// 数字直播 余额明细查询
export function balanceDetailAdmin(data) {
  return request({
    url: '/finance/livestreaming/balanceDetailAdmin',
    method: 'post',
    data: data
  })
}

// 数字直播 余额明细查询
export function withdrawalBalance(data) {
  return request({
    url: '/finance/livestreaming/withdrawalBalance',
    method: 'post',
    data: data
  })
}


// 数字直播 余额明细查询
export function createOrder(data) {
  return request({
    url: '/finance/livestreaming/createOrder',
    method: 'post',
    data: data
  })
}


// 轮询支付结果
export function orderPolling(data) {
  return request({
    url: '/finance/livestreaming/orderPolling',
    method: 'post',
    data: data
  })
}

// 获取下单参数
export function createOrderH5(data) {
  return request({
    url: '/finance/livestreaming/createOrderH5',
    method: 'post',
    data: data
  })
}

// 获取下单礼物列表
export function getSzGift() {
  return request({
    url: '/finance/livestreamingUser/getSzGift',
    method: 'get'
  })
}


// 获取主播列表
export function getSzanchor() {
  return request({
    url: '/finance/livestreamingUser/getSzanchor',
    method: 'get'
  })
}

// 冻结/开启
export function frozenOrEnable(data) {
  return request({
    url: '/finance/livestreaming/frozenOrEnable',
    method: 'post',
    data: data
  })
}

// vip变更记录查询
export function vipUpgradeRecord(data) {
  return request({
    url: '/finance/livestreamingUser/vipUpgradeRecord',
    method: 'post',
    data: data
  })
}


// 抵扣金额记录查询
export function deductionAmountRecord(data) {
  return request({
    url: '/finance/livestreamingUser/deductionAmountRecord',
    method: 'post',
    data: data
  })
}

// 修改代理等级
export function updateUserVip(data) {
  return request({
    url: '/finance/livestreamingUser/updateUserVip',
    method: 'post',
    data: data
  })
}


// 抵扣还款
export function updateDeduction(data) {
  return request({
    url: '/finance/livestreamingUser/updateDeduction',
    method: 'post',
    data: data
  })
}
